package com.park.dao.resource;

import com.park.client.model.resource.ResourceCommentModel;
import com.park.dao.base.BaseMapper;

public interface ResourceCommentMapper extends BaseMapper<ResourceCommentModel>{
	/**
	 * 根据用户ID和资源ID判断该用户是否已经收藏过
	 * @param record
	 * @return
	 */
	ResourceCommentModel selectIsExist(ResourceCommentModel record);
	
	/**
	 * 计算评论平均分
	 * @param resourceId
	 * @return
	 */
	Integer selectAvgScore(Long resourceId);
}